The invention relates to a method of encoding an input information stream in one operation, which input information stream comprises a stream of information units [IN], comprising an encoding step of converting the input information stream into an output information stream, said output information stream comprising a variable stream of information units [RENC], the variable stream of information units being between a minimum value RENC,MIN and a maximum value RENC,MAX, while the effect of the encoding step can be influenced by means of at least one control signal [R].
The invention also relates to an encoding device for encoding an input information stream comprising a steam of information units [RIN] into an output information stream, said output information stream comprising a variable stream of information units [RENC] which is between a minimum value [RENC,MIN] and a maximum value [RENC,MAX].
The invention further relates to a recording device for recording an information stream on a record carrier, said device comprising recording means for recording an information stream on the record carrier.
Such a method, encoding device and recording device are known from European patent application EP 0 802 682 (xe2x80x9cVideo encoder and recording devicexe2x80x9d, publication date 22-10-1997). This application discloses a system for encoding video information, in which the encoded information is recorded on a disc such as, for example, the digital video disc (DVD). To this end, the system comprises a compression unit having a variable output information stream (Variable Bit Rate, VBR). An example of such a compression unit is a unit operating in accordance with the MPEG2 method which is described, inter alia, in IEEE Transactions on Consumer Electronics, Vol. 41, No. 3, August 1995, pp. 504-509, xe2x80x9cVideo disc system using variable bit ratexe2x80x9d. The system, which is known from the above-mentioned application, is suitable for encoding the information stream in one operation. Due to the variable output information stream, rendering the quantity of storage space required for recording the video information unknown in advance, and the fixed quantity of storage space present on a disc, the compression unit is operated in the limited variable output information stream mode (constraint VBR). The variation of the output stream is dynamically limited in such a way that the quantity of storage space on a disc is sufficient for storing the desired quantity of video information. The variation of the output stream is limited by controlling quality-defining parameters of the compression unit such as, for example, the maximum value of the variable stream of information units [RMAX], the minimum value of the variable stream of information units [RMIN] and the quantization scale [QSC]. It is known that a compression unit with a variable output information stream yields a more efficient encoding at the same picture quality than a compression unit with a constant output information steam (Constant Bit Rate, CBR).
A problem in the known system is that there is no linear relation between the storage space on a disc, expressed in information units, and the quantity of information, expressed in length of time, which can be stored on the disc. This is very confusing to a user, because he does not know at any moment during recording how much storage capacity, expressed in length of time, is left. Moreover, it is confusing that, if a block of information having a given length of time is erased, information may be stored in the erased block whose -length of time significantly deviates from the length of time of the erased block comprising information.
It is an object of the invention to provide a method of encoding an information stream into a variable stream of information units, in which for a user a substantially linear relation appears to exist between the length of time of the encoded information stream and the storage space required for storing the encoded information stream.
According to the invention, this object is achieved by means of a method of encoding an input information stream, which is characterized in that the method comprises a measuring step in which, at any instant T, a quantity of information units [ENCOUT(T)] generated in the encoding step, reduced by a chosen average value of the variable stream of information units in the output information stream [RENC,AVER] multiplied by the instant T, is recorded in accordance with the formula [ENCOUT(T)xe2x88x92RENC,AVERxc2x7T], and a comparison step in which the quantity of information units [ENCOUT(T)xe2x88x92RENC,AVERxc2x7T] recorded in the measuring step is compared with at least one criterion, and in which at least one signalizing signal [S] is generated, and a control step in which at least one control signal [R] is generated, in which the state of the control signal depends on the state of at least one of the signalizing signals [S] generated in the comparison step, and which control signal influences the effect of the encoding step.
At any instant T, the quantity of information units ENCOUT(T) generated in the encoding step is recorded. This quantity is reduced by a chosen average value of the variable stream of information units in the output information stream, RENC,AVER, multiplied by the time T. By means of these data, the variable stream (Variable Bit Rate) of information units generated in the encoding step and ranging between a minimum value RENC,MIN and a maximum value RENC,MAX can be represented at any instant T by a constant stream (Constant Bit Rate) of information units having a chosen value RENC,AVER and a quantity of [ENCOUT(T)xe2x88x92RENC,AVERxc2x7T] information units which are stored in an imaginary buffer (referred to as virtual buffer). Due to the constant stream of information units, a linear relation can be established between the storage space on a disc, expressed in information units DSIZE, and the quantity of information expressed in length of time TDISC that can be stored on the disc, namely TDISC=DSIZE/RENC,AVER. Since the stream of information units generated in the encoding step is actually a variable stream, TDISC is actually an approximation. The deviation of the approximated value of TDISC from the real value of TDISC is (ENCOUT(T)xe2x88x92RENC,AVERxc2x7T)/RENC,AVER.
In a comparison step, the quantity of information units stored in the virtual buffer is compared with at least one criterion, and at least one signalizing signal is generated, with the state of the signalizing signals being dependent on the result of the comparisons. Subsequently, control signals influencing the effect of the encoding step and hence the quantity of information units ENCOUT(T) generated in this encoding step are generated in dependence upon the signalizing signal. Via the mechanism of signalizing signals and control signals, the quantity of information units stored in the virtual buffer, and hence the deviation from the approximated value TDISC with respect to the real value of TDISC can be influenced.
The comparison step criteria may be fixed criteria which are always identical at the start of the method. However, it is alternatively possible to modify the criteria in dependence upon previous executions of the method. These so-called self-learning criteria do not always need to be identical at the start of the method.
An embodiment of the method according to the invention is characterized in that a first criterion is xe2x88x92xcex1xc2x7TVBxc2x7RENC,AVER and a second criterion is xcex1xc2x7TVBxc2x7RENC,AVER, in which TVB represents a chosen time constant and in which xcex1 represents a constant chosen value, and in that a first signalizing signal [SUNDER] acquires a predetermined value if the equation ENCOUT(T)xe2x88x92[RENC,AVER]xc2x7Txe2x89xa6xe2x88x92xcex1xc2x7TVBxc2x7RENC,AVER is true, and in that a second signalizing signal [SOVER] acquires a predetermined value if the equation ENCOUT(T)xe2x88x92RENC,AVERxc2x7Txe2x89xa7xcex1xc2x7TVBxc2x7RENC,AVER is true, and in that at least one control signal influences the effect of the encoding step in such a way that the minimum value of the variable stream of information units in the output information stream [RENC,MIN] will be equal to RENC,AVER if the first signalizing signal [SUNDER] has the predetermined value, and in that at least one control signal influences the effect of the encoding step in such a way that the maximum value of the variable stream of information units in the output information stream [RENC,MAX] will be equal to RENC,AVER if the second signalizing signal [SOVER] has the predetermined value.
In this embodiment, the quantity of information units stored in the virtual buffer, ENCOUT(T)xe2x88x92RENC,AVERxc2x7T is limited to a value between xe2x88x92xcex1TVBxc2x7RENC,AVER and xcex1xc2x7TVBxc2x7RENC,AVER. Consequently, the deviation of the approximated value of TDISC with respect to the real value of TDISC is limited to a value between xe2x88x92xcex1xc2x7TVB and xcex1xc2x7TVB. By adapting the minimum value RENC,MIN or the maximum value RENC,MAX of the variable output information stream, it is prevented that the quantity of information units stored in the virtual buffer, ENCOUT(T)xe2x88x92RENC,AVERTxc2x7T acquires a value outside the range between xe2x88x92xcex1xc2x7TVBxc2x7RENC,AVER and xcex1xc2x7TVBxc2x7RENC,AVER.
An embodiment of the method according to the invention is characterized in that the chosen constant xcex1 has a value of 1.
In this embodiment, the chosen time constant TVB represents the maximum deviation of the approximated value of TDISC with respect to the real value of TDISC.
An embodiment of the method according to the invention is characterized in that all states of the control signals [R] to be generated in the control step are laid down in elements of a table, and in that an element from the table is selected in dependence upon the state of at least one signalizing signal [S], and in that the state of the control signals laid down in the selected element is generated.
In a table, referred to as look-up table, with N elements, all states of the control signals to be generated in the control step are laid down in the elements of the look-up table. Per element, the states of the control signals are laid down for those control signals which occur simultaneously. A given control signal may be incorporated in a plurality of elements of the look-up table, in which case the fixed value of the control signal may deviate for each element.
Dependent on the state of at least one signalizing signal, a given element from the look-up table is selected. The control signals incorporated in the selected element subsequently acquire the values laid down in the selected element.
An embodiment of the method according to the invention is characterized in that the number of elements of the table is equal to 2xc2x7TVBxc2x7RENC,AVER+1.
If the number of elements N of the look-up table is equal to 2xc2x7TVBxc2x7RENC,AVER+1, and if the maximum deviation of the approximated value of TDISC with respect to the real value of TDISC does not become larger than the chosen time constant TVB, then each value of the quantity of information units stored in the virtual buffer, ENCOUT(T)xe2x88x92RENC,AVERxc2x7T may be assigned to an element of the look-up table via a signalizing signal which acquires the state M if the equation ENCOUT(T)xe2x88x92RENC,AVERxc2x7T=M is true, in which M is an integer between xe2x88x92TVBxc2x7RENC,AVER and TVBxc2x7RENC,AVER.
AN embodiment of the method according to the invention is characterized in that at least one signalizing signal [S] comprises a derivative of the quantity of information units [ENCOUT(T)xe2x88x92RENC,AVERxc2x7T], recorded in the measuring step, as a function of time T.
The signalizing signal, generated in the comparison step, comprising the time derivative (ENCOUT(T)xe2x88x92RENC,AVERxc2x7T)/T may signalize a trend in the quantity of information units stored in the virtual buffer, ENCOUT(T)xe2x88x92RENC,AVERxc2x7T. Subsequently, control signals, comprised in the signalizing signal, may be generated in dependence upon the signalized trend, which control signals influence the effect of the encoding step and hence the quantity of information units ENCOUT(T) generated in this encoding step.
An embodiment of the method according to the invention is characterized in that the quantity of information units [ENCOUT(T)] generated in the encoding step is assigned an initial value ENCOUT(0) at the start of the method.
If the method according to the invention is repeatedly performed on input information streams and if the associated output information streams are stored on the same record carrier such as a disc, then the total maximum deviation of the approximated value of TDISC with respect to the real value of TDISC will be an accumulation of the separate maximum deviations of the approximated value of TDISC with respect to the real value of TDISC for each execution of the method if the quantity of information units [ENCOUT(0)] is equal to 0 at the start of each execution of the method.
This accumulation of deviations may be prevented by assigning an initial value ENCOUT(0) at the start of the method to the quantity of information units [ENCOUT(T)] generated in the encoding step. If the assigned initial value ENCOUT(0) at the ith execution of the method, at which the output information stream is stored on a record carrier, is equal to the value ENCOUT(T)xe2x88x92RENC,AVERxc2x7T upon termination of the (ixe2x88x921)th execution of the method at which the output information stream is stored on the same record carrier, then there will be no accumulation of the deviation. Alternatively, the assigned initial value ENCOUT(0) upon the ith execution of the method may be a value derived from a value of ENCOUT(T)xe2x88x92RENC,AVERxc2x7T upon termination of the (ixe2x88x921)th execution of the method. This is the case, for example, if a part of the output information stream or the entire output information stream recorded on a record carrier at an earlier instant is erased or overwritten.
The initial value ENCOUT(0) to be assigned upon the ith execution of the method may also be distilled from a table of contents (TOC) of the record carrier or from the distribution on the record carrier of the information stored on the record carrier, with the output information stream associated with the previous (ixe2x88x921)th executions of the method being stored on the record carrier.
An embodiment of the method according to the invention is characterized in that the value of the quantity of information units [ENCOUT(T)xe2x88x92RENC,AVERxc2x7T] recorded in the measuring step is laid down.
The value of the quantity of information units [ENCOUT(T)xe2x88x92RENC,AVERxc2x7T] recorded in the measuring step is laid down in such a way that this value may be used, for example, as an initial value ENCOUT(0) upon a subsequent execution of the method.
The value of the quantity of information units [ENCOUT(T)xe2x88x92RENC,AVERxc2x7T] recorded in the measuring step may be laid down, for example, once upon termination of the method, or at more instants with regular intervals in between.
An embodiment of the method according to the invention is characterized in that, in the control step, at least one control signal is generated, the state of the control signal depending on an externally supplied indication signal which is typical of the contents of the input information stream.
An indication signal supplied externally, which is typical of the contents of the input information stream, controls the encoding step via at least one control signal. This control may be such that, for an input information stream comprising a given type or kind of information, the encoding step for this type of information proceeds optimally. The indication signal may be supplied, for example, manually or come from the same source as the input information stream.
It is another object of the invention to provide an encoding device making use of the method of encoding an information stream into a variable stream of information units, in which a substantially linear relation appears to exist for a user between the length of time of the encoded information stream and the storage space required for storing the encoded information stream.
This object is achieved by providing an encoding device for encoding an input information stream according to the invention, which is characterized in that the device comprises a compression unit, and means for recording the quantity of information units [ENCOUT(T)] generated by the encoding device, means for determining the recorded quantity of information units [ENCOUT(T)], reduced by a chosen average value of the variable stream of information units in the output information stream [RENC,AVER], multiplied by the instant T in accordance with the formula ENCOUT(T)xe2x88x92RENC,AVERxc2x7T, means for comparing the determined quantity of information units with at least one criterion, means for generating at least one signalizing signal, and means for generating at least one control signal.
An embodiment of the encoding device according to the invention is characterized in that the device is provided with means for inputting an initial value of the recorded quantity of information units [ENCOUT(0)].
A further object of the invention is to provide a recording device for recording an information stream on a record carrier, which recording device makes use of the encoding device using the method of encoding an information stream into a variable stream of information units, in which a substantially linear relation appears to exist for a user between the length of time of the encoded information stream and the storage space required for storing the encoded information stream.
This object is achieved by providing a recording device for recording an information stream on a record carrier according to the invention, which is characterized in that the device comprises an encoding device according to the invention.
An embodiment of the recording device according to the invention is characterized in that the device is provided with means for recording the value of the determined quantity of information units ENCOUT(T)xe2x88x92RENC,AVERxc2x7T on the record carrier.
These and other aspects of the invention are apparent from and will be elucidated with reference to the embodiment(s) described hereinafter.